.maze-game {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;
}

.maze {
  display: grid;
  gap: 1px;
  background: #fff;
  padding: 2px;
  border-radius: 8px;
  box-shadow: 
    0 10px 20px rgba(0,0,0,0.1),
    0 6px 6px rgba(0,0,0,0.1);
  margin: 20px auto;
}

/* Cell styles */
.cell {
  transition: background-color 0.2s;
}

.wall { background: #2c3e50; }
.path { 
  background: #fff;
  border: 1px solid #eee;
}
.start { 
  background: #42b883;
  animation: pulse 2s infinite;
}
.end { 
  background: #ff7675;
  animation: pulse 2s infinite;
}
.player {
  background: #3498db;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(52, 152, 219, 0.5);
  animation: bounce 0.5s ease-in-out;
}

/* Game info styles */
.game-info {
  background: white;
  padding: 10px;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  margin-bottom: 10px;
}

.info-container {
  display: flex;
  justify-content: center;
  gap: 40px;
  align-items: center;
}

/* Game level styles */
.game-level {
  min-width: 150px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  transition: transform 0.2s;
}

.game-level:hover {
  transform: translateY(-2px);
}

.game-level h2 {
  color: #2c3e50;
  font-size: 24px;
  margin: 0;
}

/* Controls styles */
.config-controls {
  min-width: 280px;
  background: #f8f9fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.size-control {
  margin: 0;
  padding: 5px 0;
  display: flex;
  justify-content: end;
  align-items: center;
}

.size-control label {
  color: #2c3e50;
  font-weight: 500;
  margin: 0 10px 8px 0;
}

.size-control input[type="range"] {
  width: 200px;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  outline: none;
  -webkit-appearance: none;
}

.size-control input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  background: #42b883;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}

/* Victory modal styles */
.victory-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 15px 30px rgba(0,0,0,0.2);
  text-align: center;
  animation: modalAppear 0.3s ease-out;
}

.victory-modal h2 {
  color: #42b883;
  margin-bottom: 15px;
}

button {
  background: #42b883;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

button:hover {
  background: #3aa876;
  transform: translateY(-2px);
}

/* Animations */
@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.05); }
  100% { transform: scale(1); }
}

@keyframes bounce {
  0% { transform: scale(0.9); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

@keyframes modalAppear {
  0% { 
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  100% { 
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

/* Responsive styles */
@media (max-width: 768px) {
  .maze-game {
    padding-bottom: 140px !important;
  }

  .game-info {
    margin: 0 !important;
    padding: 3px !important;
    font-size: 0.85em !important;
  }

  .info-container {
    flex-direction: column;
    align-items: center;
    gap: 5px !important;
    padding: 2px !important;
  }

  .game-level {
    min-width: 80px !important;
    padding: 5px !important;
  }

  .game-level h2 {
    font-size: 16px;
    margin-bottom: 2px;
  }

  .game-level p {
    font-size: 11px;
    margin: 2px 0;
  }

  .config-controls {
    min-width: 200px !important;
    padding: 5px !important;
  }

  .size-control {
    padding: 2px 0 !important;
  }

  .size-control label {
    font-size: 12px;
    margin: 0 5px 0 0;
  }

  .size-control input[type="range"] {
    width: 120px !important;
  }
}

@media (max-width: 480px) {
  .game-info {
    padding: 2px;
  }

  .game-level h2 {
    font-size: 14px;
  }

  .game-level p {
    font-size: 10px;
  }

  .config-controls {
    min-width: 180px;
  }

  .size-control input[type="range"] {
    width: 100px;
  }
}
